package com.smzd.ccms.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.smzd.ccms.domain.Attachment;
import com.smzd.ccms.mappers.AttachmentMapper;
import com.smzd.core.dao.AbstractDao;
import com.smzd.core.mappers.IMapper;

@Component
public class AttachmentDao extends AbstractDao<Attachment> {
	@Autowired
	private AttachmentMapper mapper;

	@Override
	protected IMapper<Attachment> getMapper() {
		return mapper;
	}

	public List<Attachment> getAllAttachments(int scopeId) {
		return mapper.getAllAttachments(scopeId);
	}

	public List<Attachment> getAllAttachmentsForFirstArticle(int chId) {
		return mapper.getAllAttachmentsForFirstArticle(chId);
	}
}